package com.xbongbong.admin.domain.dao;

import com.xbongbong.admin.domain.entity.PaasAppRetainEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author guohui.zhang
 * @Title: 应用副本表实现类
 * @date 2020/3/1710:06
 */
@Repository
@Mapper
public interface PaasAppRetainDao {
    Integer insert(PaasAppRetainEntity paasApp);

    Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    PaasAppRetainEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    List<PaasAppRetainEntity>  findEntitys(@Param("param") Map<String, Object> param);

    /**
     * 更新实例
     * @param entity 实体
     * @author xingxing.xiao
     * @date 2020/01/09 09:54
     */
    Integer update(PaasAppRetainEntity entity);

    /**
     * 根据应用安装id查询单个实体
     * @param appInstallId
     * @param corpid
     * @return
     */
    PaasAppRetainEntity getByAppInstallId(@Param("appInstallId") Long appInstallId, @Param("corpid") String corpid);
}
